package vip.source.pattern.part23.Interpreter;

/**
 * 减法表达式
 */
public class SubtractExpression implements CustomExpression {
    private CustomExpression left;
    private CustomExpression right;

    public SubtractExpression(CustomExpression left, CustomExpression right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public int interpret() {
        return left.interpret() - right.interpret();
    }
}
